﻿#ifndef MENU_H
#define MENU_H

#include <QObject>
#include <QDebug>

#include "Autosave.h"
#include "SubMenu.h"

class Menu : public QObject , Autosave
{
    Q_OBJECT
    Q_PROPERTY(bool wifi READ wifi WRITE setWifi NOTIFY wifiChanged)
    Q_PROPERTY(bool bluetooth READ bluetooth WRITE setBluetooth NOTIFY bluetoothChanged)

    Q_PROPERTY(SubMenu *submenu READ submenu CONSTANT FINAL)

    bool m_wifi = false;

    bool m_bluetooth = true;

    Q_PROPERTY(int flag MEMBER m_flag)
    int m_flag = 0;

    SubMenu *m_submenu;

public:
    explicit Menu(QObject *parent = nullptr);
    ~Menu();

    bool wifi() const;
    void setWifi(bool newWifi);

    bool bluetooth() const;
    void setBluetooth(bool newBluetooth);

    SubMenu *submenu() const;

signals:

    void wifiChanged();
    void bluetoothChanged();
};

#endif // MENU_H
